<template>
	<view class="myfuwu">
		<view class="myfuwu-i" v-for="item,index in list" :key="index" @click="myfuwu(item.text.slice(0,2))">
			<u-icon size="40" :name="item.name"></u-icon>
			<text class="title" v-if="item.show">{{item.title}}</text>
			<view class="" style="margin-top: 20rpx;">{{item.text}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "myFuwu",
		props: {
			list: {
				type: Array,
				default: []
			}
		},
		data() {
			return {

			}
		},
		methods: {
			myfuwu(text) {
				console.log(text);
				this.$emit("fn", text)
			}
		}
	}
</script>

<style lang="scss">
	.myfuwu {
		display: flex;
		flex-wrap: wrap;
	}

	.myfuwu-i {
		width: 25%;
		text-align: center;
		padding: 30rpx 0;
		position: relative;
	}

	.myfuwu-i .title {
		position: absolute;
		background-color: red;
		color: #fff;
		right: 0;
		top: 0;
		font-size: 20rpx;
		padding: 0 5rpx;
		border-radius: 15rpx 15rpx 15rpx 0;
	}
</style>
